home *** CD-ROM | disk | FTP | other *** search
- global oncursor, handcursor, catchcursor, girlobjlist, lingobj, getlinggirlnum, userid, userpw, userpg, userpm, jumpmoviename, jumpmode, trylingcount, lasteventtime
-
- on startMovie
- set oncursor to [the number of cast "onCursor", the number of cast "onCursor" + 1]
- set handcursor to [the number of cast "handCursor", the number of cast "handCursor" + 1]
- set catchcursor to [the number of cast "catchCursor", the number of cast "catchCursor" + 1]
- set getlinggirlnum to 0
- set trylingcount to 0
- set girlobjlist to EMPTY
- if not voidp(userid) then
- put userid into field "userID"
- end if
- put field "addInfoText1" into field "addInfo"
- set lasteventtime to the ticks
- resetcursor()
- end
-
- on stopMovie
- put "guest" into field "userID"
- put 0 into field "point"
- put 0 into field "label"
- end
-
- on allpuppetoff
- repeat with s = 1 to 48
- set the puppet of sprite s to 0
- set the cursor of sprite s to 0
- end repeat
- sound stop 2
- end
-
- on gameback
- if (the ticks - lasteventtime) > 15 then
- if the frame >= label("check") then
- resetcursor()
- allpuppetoff()
- go("loop")
- else
- if the frame >= label("help") then
- if not listp(girlobjlist) then
- resetcursor()
- allpuppetoff()
- go("loop")
- else
- set the puppet of sprite clickOn() to 0
- go(label("game") + 1)
- sethandcursor()
- end if
- else
- if the frame >= label("game") then
- resetcursor()
- allpuppetoff()
- go("loop")
- else
- jumpnetmovie("menu.dcr", 0)
- end if
- end if
- end if
- end if
- set lasteventtime to the ticks
- end
-
- on gamehelp
- set the puppet of sprite clickOn() to 0
- go("help")
- end
-
- on gamequit
- if (the ticks - lasteventtime) > 15 then
- if the frame >= label("check") then
- jumpnetmovie("menu.dcr", 0)
- else
- set the puppet of sprite clickOn() to 0
- showscore()
- end if
- end if
- set lasteventtime to the ticks
- end
-
- on resetcursor
- cursor(oncursor)
- end
-
- on sethandcursor
- repeat with s = 18 to 29
- set the cursor of sprite s to handcursor
- end repeat
- end
-
- on resetgame
- set getlinggirlnum to 0
- set trylingcount to 0
- set girlobjlist to []
- add(girlobjlist, birth(script "girl script", 415, 78, 4))
- add(girlobjlist, birth(script "girl script", 415, 169, 5))
- add(girlobjlist, birth(script "girl script", 415, 260, 6))
- set lingobj to EMPTY
- sethandcursor()
- end
-
- on dogame
- dragling()
- randomchangegirl()
- rolloverbtn()
- end
-
- on showscore
- put getlinggirlnum into char 12 of userpm
- if getlinggirlnum = 9 then
- put 100 into field "label"
- put 90 into field "point"
- put field "addInfoText2" into field "addInfo"
- repeat with l = 1 to count(girlobjlist)
- setloopgirl(getAt(girlobjlist, l))
- end repeat
- else
- put integer(getlinggirlnum * 10) into field "label"
- put integer(getlinggirlnum * 10) into field "point"
- put field "addInfoText1" into field "addInfo"
- repeat with l = 1 to count(girlobjlist)
- setdegirl(getAt(girlobjlist, l))
- end repeat
- end if
- go("check")
- end
-
- on jumpnetmovie mname, jmode
- sound stop 2
- set jumpmoviename to mname
- set jumpmode to jmode
- if userid = "guest" then
- set jumpmode to 1
- end if
- repeat with s = 1 to 48
- set the puppet of sprite s to 0
- end repeat
- if jumpmode then
- gotonetmovie(mname)
- else
- setuserpm()
- end if
- go("move")
- end
-
- on setuserpm
- getnettext("http://202.224.191.2/cgi-bin/EcOpe.cgi?name=" & userid & "&password=" & userpw & "&amount=" & userpg & "¶meter=" & userpm)
- end
-
- on checknetresult
- if jumpmode then
- exit
- end if
- if netdone() then
- set nresult to nettextresult()
- if nresult starts "<" then
- alert(deletetag(nresult))
- go("loop")
- abort()
- else
- if nresult starts "E000" then
- if line 1 of nresult = "E0000" then
- set rtext to "Error : Server System Error"
- else
- if line 1 of nresult = "E0001" then
- set rtext to "Error : " & userid & "The name is not registered."
- else
- if line 1 of nresult = "E0002" then
- set rtext to "Error : The password is wrong."
- else
- if line 1 of nresult = "E0003" then
- set rtext to "Error : The parameter's form is wrong."
- else
- if line 1 of nresult = "E0003" then
- set rtext to "Error : Your balance is short - you cannot make a withdrawal."
- end if
- end if
- end if
- end if
- end if
- alert(rtext)
- go("loop")
- abort()
- else
- set jumpmode to 1
- gotonetmovie(jumpmoviename)
- end if
- end if
- end if
- end
-
- on deletetag ctext
- repeat while ctext contains "<"
- set fchar to offset("<", ctext)
- set echar to offset(">", ctext)
- delete char fchar to echar of ctext
- end repeat
- return ctext
- end
-
- on rolloverbtn
- set rcnum to the mouseCast
- if rcnum > 0 then
- set rcname to string(the name of cast rcnum)
- if item 2 of rcname = "off" then
- repeat with s = 41 to 43
- if the castNum of sprite s = rcnum then
- set the puppet of sprite s to 1
- set the castNum of sprite s to rcnum + 1
- next repeat
- end if
- set the puppet of sprite s to 0
- end repeat
- else
- if item 2 of rcname = "on" then
- repeat with s = 41 to 43
- if the castNum of sprite s = rcnum then
- if the mouseDown and (clickOn() = s) then
- set the castNum of sprite s to rcnum + 1
- updateStage()
- do(item 1 of rcname)
- end if
- end if
- end repeat
- else
- if item 2 of rcname = "click" then
- repeat with s = 41 to 43
- if the castNum of sprite s = rcnum then
- if the mouseUp then
- set the castNum of sprite s to rcnum - 1
- next repeat
- end if
- do(item 1 of rcname)
- end if
- end repeat
- else
- repeat with s = 41 to 43
- set the puppet of sprite s to 0
- end repeat
- end if
- end if
- end if
- else
- repeat with s = 41 to 43
- set the puppet of sprite s to 0
- end repeat
- end if
- end
-
- on getling
- set glnum to clickOn()
- if (glnum < 18) or (glnum > 29) then
- exit
- end if
- if not rollOver(glnum) then
- exit
- end if
- set lingobj to birth(script "ling script", the mouseH, the mouseV, glnum)
- cursor(catchcursor)
- set the cursor of sprite glnum to catchcursor
- end
-
- on randomchangegirl
- set bgmmode to 0
- repeat with l = 1 to count(girlobjlist)
- changegirl(getAt(girlobjlist, l))
- if the castNum of sprite (l + 3) = the number of cast "g_ling.loop" then
- set bgmmode to 1
- end if
- end repeat
- if not bgmmode then
- sound stop 2
- end if
- end
-
- on dragling
- if not objectp(lingobj) then
- if the mouseDown then
- getling()
- else
- resetcursor()
- sethandcursor()
- end if
- else
- if the mouseDown and (the flymode of lingobj = 0) then
- lingmove(lingobj)
- else
- resetcursor()
- sethandcursor()
- if ((the mouseH < 101) or (the mouseH > 159)) and (the flymode of lingobj = 0) then
- set the puppet of sprite the snum of lingobj to 0
- set lingobj to EMPTY
- else
- setlingflymode(lingobj)
- flyling(lingobj)
- end if
- end if
- end if
- end
-